<?php
namespace Model;
//Här lagras alla kommentarer i en array
class CommentArray {

	private $m_comments = array();
        
        public function __construct() {
                
        }
        
        public function add(Comment $comment) {
                $this->m_comments[] = $comment; 
        }
        
        public function get() {
                return $this->m_comments;
        }
}

class Comment {
		private $m_commentId; //Integer
        private $m_postId; //Integer
        private $m_name; //String
        private $m_comment; //String
        private $m_date; //TimeStamp
        
        public function __construct($c_id, $p_id, $name, $comment, $date) {
                $this->m_commentId = $c_id;
				$this->m_postId = $p_id;
                $this->m_name = $name;
                $this->m_comment = $comment;
				$this->m_date = $date;
        }
        
        public function getCommentId() {
                return $this->m_commentId;
        }
		
        public function getPostId() {
                return $this->m_postId;
        }
        
        public function getName() {
                return $this->m_name;
        }
        
        public function getComment() {
                return $this->m_comment; 
                                
        }
		public function getDate() {
                return $this->m_date; 
                                
        }
}